//
//  HLHomeLabelRequest.m
//  YueYue
//
//  Created by hulu001 on 2023/5/25.
//

#import "HLHomeLabelRequest.h"

@implementation HLHomeLabelRequest
{
    NSString *_code;
}

- (id)initWithType:(HLHomeLabelType)type
{
    self = [super init];
    
    if (self) {
        switch (type) {
            case HLHomeLabelTypeHome:
                _code = @"1";
                break;
            case HLHomeLabelTypeSquare:
                _code = @"2";
                break;
        }
    }
    
    return self;
}

- (NSString *)requestUrl
{
    return @"/app/home/tag";
}

- (YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

- (id)requestArgument
{
    return @{@"displayPosition":_code};
}


- (NSArray <HLHomeLabelModel *> *)labelList
{
    NSArray *lists = @[];
    
    NSArray *netArray = [self.result valueForKey:@"data"];
    
    if (![netArray isKindOfClass:NSArray.class]) {
        return lists;
    }

    if (netArray.count > 0) {
       lists = [HLHomeLabelModel mj_objectArrayWithKeyValuesArray:netArray];
    }
    
    return lists;
}

- (NSArray <NSDictionary *> *)localDatas
{
    return @[
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"1",
            @"tagCode": @"default_fc",
            @"tagGroup": @"local",
            @"tagName": @"视频",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"2",
            @"tagCode": @"default",
            @"tagGroup": @"local",
            @"tagName": @"聊天",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"1",
            @"tagCode": @"short_video",
            @"tagGroup": @"local",
            @"tagName": @"短视频",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"1",
            @"tagCode": @"live",
            @"tagGroup": @"local",
            @"tagName": @"直播中",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
    ];
}

- (NSArray <NSDictionary *> *)datas
{
    return @[
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"1",
            @"tagCode": @"attention",
            @"tagGroup": @"evaluate",
            @"tagName": @"关注",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"1",
            @"tagCode": @"today",
            @"tagGroup": @"evaluate",
            @"tagName": @"今日推荐",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
        @{
            @"applyMaleClient": @"YueYuePro",
            @"cteTime": @"2023-06-01 16:54:18",
            @"cteUser": @"admin",
            @"delFlag": @"0",
            @"displayPosition": @"1",
            @"showType": @"1",
            @"tagCode": @"week",
            @"tagGroup": @"evaluate",
            @"tagName": @"每周餐单",
            @"tagSort": @"19",
            @"tagUrl": @"https://oss.yuetalks.cn/yuejiao/pf/tagUrl/voice.jpg",
            @"uteTime": @"2023-06-01 16:54:22",
            @"uteUser": @"admin",
        },
    ];
}

@end
